# coding: utf-8
from . import db, BaseModel


class Plan(db.Model):
    __tablename__ = 'plan'

    auto_id = db.Column(db.Integer, primary_key=True)
    plan_id = db.Column(db.Integer, info='学习计划id')
    plan_quantity = db.Column(db.Integer, info='学习计划的单词数量')
    plan_time = db.Column(db.Integer, info='学习计划的学习时间，单位为分')
    dictionary_id = db.Column(db.Integer, info='词典的id')
    plan_type = db.Column(db.Integer, server_default=db.FetchedValue(), info='学习方式：0-字母顺序学习 1-字母逆序学习 2-随机学习')
    user_id = db.Column(db.Integer, info='用户id做为外键')
    is_delete = db.Column(db.Integer, server_default=db.FetchedValue(), info='是否被删除')
    create_time = db.Column(db.DateTime, server_default=db.FetchedValue(), info='创建记录时间')
    update_time = db.Column(db.DateTime, server_default=db.FetchedValue(), info='更新记录时间')
